<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
		<meta name="author" content="lushu">
		<title>发票明细</title>
		<script type="text/javascript" language="javascript" src="../script/common.js"></script>
		<script type="text/javascript" language="javascript" src="../script/common_stat.js"></script>
		<script type="text/javascript" language="javascript">
			var Page;
			var SHIFT_STATUS = [ShiftStatus.CONFIRM_OPENING,ShiftStatus.CONFIRM_CLOSING];
			function initPageElements(){
				Page.sql = "counter_shift_list";
				Page.selection.shiftStatus = {list:Common.getSubsetItems("shift_status",SHIFT_STATUS),
								nullLabel:"全  部"};
				Page.operation = {title:"操作",
									width:"5%",
									align:"center",
									render:function(v,r){
												return "<a href=# onclick='showStat("+r[0]+");'>明细</a>";
											}
								};
			}
			
			function showStat(shiftID){
				DWR.call(
					'counterService.loadShift',
					shiftID,
					function(shift){
						TX.Shift.showDetail(shift,'shiftDetail');
					}
				);
				TX.Shift.showShiftChecks(shiftID);
				switchPage("detailView");
			}

		</script>
	</head>
	<body onload="TX.List.init()" >
		<div class="nav"><div id="nav">&nbsp;</div></div>
		<div id="listView" >
			<div class="searchForm">
				<form id='searchForm' name='searchForm'>
					<input type="hidden" name="orgID">
					<table cellSpacing="0" cellPadding="4" width="100%" border="0">
						<tr>
							<td class="label5" id="beginDateTd"></td>	
							<td class="label5" id="endDateTd"></td>
							<td>
								<label>班结状态</label> 
								<select name="shiftStatus"></select>
							</td>
							<td><button onclick="ListPage.showListTable()">查 询</button></td>
						</tr>
					</table>
				</form>
			</div>
			<div id="datalist"></div>
		</div>
		
		<div id="detailView" style="display:none">
			<div id="printArea" class="form" >
				<div class="formTitle">班次信息</div>
				<div id="shiftDetail"></div>
				<div class="formTitle">卡库存统计报表</div>
				<div id="card"></div>
				<div class="formTitle">交易统计报表</div>
				<div id="trade"></div>
				<div class="formTitle">发票统计报表</div>
				<div id="invoice"></div>
			</div>
			<p>
				<button onclick="WebPrint.preview('printArea')">打印预览</button>
				<button onclick="WebPrint.print('printArea')">打印</button>
				<button onclick="switchPage('listView')">返 回</button>
			</p>
		</div>
	</body>
</html>
